package Data;

import org.hibernate.Session;
/**
 * Tag Manager for save, delete and update the Tags in the DB
 * 
 * @author Vladimir Sarkisyan & Erez Levy
 *
 */
public class TagManager {
 private Session session = null;
 public TagManager(Session session) {
  if(session == null)
    throw new 
      RuntimeException("Invalid session object.");
  this.session = session;
 }
 public void saveTag(Tag tag){
  session.save(tag);
 }
 public void updateTag(Tag tag){
  session.update(tag);
 }
 public void deleteTag(Tag tag) {
  session.delete(tag);
 }
}
